/**
 * toolbar.scss - Theme Base Toolbar Styles
 *
 * This source-code is part of Windows XP stuff for XFCE:
 * <<https://www.oddmatics.uk>>
 *
 * Author(s): Rory Fewell <roryf@oddmatics.uk>
 */

%toolbar
{
    -GtkWidget-window-dragging: true;
    padding: 4px;
    background-color: $bg_color;
}

toolbar
{
    @extend %toolbar;

    @include __wintc_apply_props($toolbar_styles);

    padding: 4px 3px 3px 4px;

    &:first-child
    {
        border-left-width: 0px;
    }

    // RORY: This is an attempt to avoid weird borders on frames... see
    //       issue #334
    //
    box.vertical > &:last-child
    {
        border-bottom-style: none;
    }

    // On OSD
    //
    .osd &
    {
        background-color: transparent;
    }

    // Stand-alone OSD toolbars
    //
    &.osd
    {
        padding: 13px;
        border: none;
        border-radius: 5px;
        background-color: $osd_bg_color;

        &.left,
        &.right,
        &.top,
        &.bottom { border-radius: 0; } // positional classes for `attached` osd toolbars
    }

    // Toolbar separators
    //
    &.horizontal separator { margin: 0 7px 1px 6px; }
    &.vertical   separator { margin: 6px 1px 7px 0; }

    &:not(.inline-toolbar):not(.osd)
    {
        // Workaround: add margins to the children of tool items to simulate
        // spacing, ignore the overflow button (.toggle) and the overflow menu
        // (.popup)
        > *:not(.toggle):not(.popup) > *
        {
            margin-right:  1px;
            margin-bottom: 1px;
        }
    }
}

// searchbar, location-bar & inline-toolbar
//
.inline-toolbar
{
    @extend %toolbar;

    @extend %darkbar;

//    border-radius: 0  0 5px 5px;
    border-width:  0 1px 1px;
    padding:       3px;
}

searchbar > revealer > box,
.location-bar
{
    @extend %toolbar;

    @extend %darkbar;

    border-width: 0 0 1px;
    padding:      3px;
}

searchbar > revealer > box
{
    // Workaround: undo the GtkContainer:border-width and use CSS padding instead
    //
    margin:  -6px;
    padding: 6px;
}

%darkbar
{
    $l_mixed_bg: mix($bg_color, $borders_color, 70%);

    background: linear-gradient(180deg, $bg_color 0%, $l_mixed_bg 100%);
    border-color:     $borders_color;
    border-style:     solid;
}
